.task-list {
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 24px;
}

.tasks-title {
  margin: 0 !important;
}

.tasks-description {
  margin-left: 8px;
  display: block;
  margin-top: 4px;
}

.filter-card {
  margin-bottom: 16px;
}

.filter-card .ant-card-body {
  padding: 16px 24px;
}

.statistics-section {
  margin-bottom: 16px;
}

/* 简化表格样式 - 参考规则库样式 */
.task-table {
  margin-top: 0;
}

.task-table .ant-table-cell {
  padding: 8px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
}

.task-table .ant-table-tbody > tr:hover > td {
  background: #fafafa !important;
}

.task-table .ant-table-thead > tr > th {
  padding: 10px 12px;
  background: #fafafa;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e8e8e8;
}

/* 任务名称链接样式 - 支持两行显示 */
.task-table .ant-btn-link {
  color: #1890ff !important;
  text-decoration: none;
  height: auto;
  min-height: 32px;
  padding: 4px 0;
  font-weight: 500;
  text-align: left;
  justify-content: flex-start;
  white-space: normal !important;
  word-break: break-all;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: 2.8em;
}

.task-table .ant-btn-link:hover {
  color: #40a9ff !important;
}

/* 任务名称列的单元格样式 */
.task-table .ant-table-cell:first-child {
  padding: 8px 12px;
  vertical-align: top;
}

/* 移除所有行的特殊背景色，保持简洁 */
.task-row-running > td,
.task-row-success > td,
.task-row-failed > td {
  background-color: transparent !important;
  border-left: none;
}

.task-row-running:hover > td,
.task-row-success:hover > td,
.task-row-failed:hover > td {
  background-color: #fafafa !important;
}

/* 标签样式简化 */
.task-table .ant-tag {
  margin: 0;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

/* 进度条样式简化 */
.task-table .ant-progress {
  margin: 0;
}

.task-table .ant-progress-line {
  margin: 0;
}

.task-table .ant-progress-inner {
  background-color: #f5f5f5;
  height: 8px;
}

.task-table .ant-progress-bg {
  transition: all 0.3s ease;
  height: 8px !important;
}

/* 操作按钮样式简化 */
.task-table .ant-btn-sm {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 4px;
  font-weight: 500;
}

.task-table .ant-btn-primary {
  background: #1890ff;
  border-color: #1890ff;
}

.task-table .ant-btn-primary:hover {
  background: #40a9ff;
  border-color: #40a9ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

/* 表格行简化样式 */
.task-table .ant-table-tbody > tr {
  transition: background-color 0.2s;
}

.task-table .ant-table-tbody > tr > td {
  border-bottom: 1px solid #f0f0f0;
}

/* SQL源信息显示优化 */
.sql-source-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sql-source-info .source-header {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sql-source-info .source-title {
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

.sql-source-info .source-detail {
  font-size: 11px;
  color: #333;
  padding-left: 16px;
  font-weight: 500;
  opacity: 0.9;
}

/* 筛选标签样式 */
.filter-card .filter-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}

/* 自动刷新按钮样式 */
.auto-refresh-button {
  transition: all 0.3s;
}

.auto-refresh-button:hover {
  transform: scale(1.05);
}

.refresh-button:hover,
.create-task-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 统计卡片样式 */
.task-list .ant-card-body {
  padding: 16px;
}

.task-list .ant-statistic {
  text-align: center;
}

.task-list .ant-statistic-title {
  font-size: 12px;
  color: #8c8c8c;
  font-weight: 500;
}

.task-list .ant-statistic-content {
  font-size: 20px;
  font-weight: 600;
}

/* 分页样式 */
.task-table .ant-table-pagination {
  margin: 16px 0 0 0;
  text-align: right;
}

/* 加载状态优化 */
.task-list .ant-spin-nested-loading {
  min-height: 200px;
}

/* 空状态样式 */
.task-list .ant-empty {
  padding: 40px 0;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .task-list {
    max-width: 100%;
    padding: 0 16px;
  }
  
  .task-table .ant-table-cell {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  .task-table .ant-btn-sm {
    padding: 0 8px;
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .task-list {
    padding: 0 12px;
  }

  .page-header {
    margin-bottom: 16px;
  }
  
  .filter-card .ant-row {
    flex-direction: column;
    align-items: stretch !important;
  }
  
  .filter-card .ant-col {
    margin-bottom: 8px;
  }

  .filter-card .ant-space {
    flex-wrap: wrap;
  }

  .task-table .ant-table {
    font-size: 12px;
  }

  /* 移动端统计卡片调整 */
  .task-list .ant-col:nth-child(1),
  .task-list .ant-col:nth-child(2) {
    margin-bottom: 8px;
  }

  .task-list .ant-statistic-content {
    font-size: 18px;
  }

  /* 移动端表格优化 */
  .task-table .ant-table-thead > tr > th {
    padding: 8px 12px;
    font-size: 11px;
  }

  .task-table .ant-table-tbody > tr > td {
    padding: 8px 12px;
    font-size: 11px;
  }

  /* 移动端按钮组优化 */
  .filter-card .ant-space-item {
    margin-bottom: 4px;
  }
}

@media (max-width: 480px) {
  .task-list {
    padding: 0 8px;
  }

  /* 超小屏幕统计卡片堆叠 */
  .task-list .ant-row {
    flex-direction: column;
  }

  .task-list .ant-col {
    width: 100% !important;
    margin-bottom: 8px;
  }

  /* 超小屏表格滚动优化 */
  .task-table {
    font-size: 10px;
  }
  
  .task-table .ant-tag {
    font-size: 10px;
    padding: 1px 4px;
  }
  
  .task-table .ant-progress-inner {
    height: 6px;
  }
  
  .task-table .ant-progress-bg {
    height: 6px !important;
  }
}